# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-itemadapter
pkgver=0.1.0
pkgrel=0
pkgdesc="Common interface for data container classes"
options="!check" # Introduces circular dependency with py3-scrapy
url="https://github.com/scrapy/itemadapter"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-scrapy"
source="https://github.com/scrapy/itemadapter/archive/v$pkgver/itemadapter-$pkgver.tar.gz"
builddir="$srcdir/itemadapter-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$builddir/build/lib/:$PYTHONPATH" python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="43ce53bb7de287060cba1ffd397ced42372ca779310dada74ddd60848c0954bec1380cae23a4b9787bf69303e4419bb72b48e63500e65632def9410d6b46d12b  itemadapter-0.1.0.tar.gz"
